home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / utilities / guide / wb-makeinfo.lha / WB-MakeInfo / Rexx / Start_MGuide.ced < prev   
Encoding:
Text File  |  1994-11-28  |  1.9 KB  |  65 lines

  1. /*************************************************************************
  2.  * AREXX Script
  3.  *
  4.  * Start_MGuide.ced         Copyright (c) 1993, Gerhard Leibrock
  5.  *                            Derived from:
  6.  * Start_TeX.ced            Copyright 1991 by J"org H"ohle
  7.  *
  8.  * AREXX program that starts a script for MakeGuide. It uses the current CEd
  9.  * view and the .texi program located in it.
  10.  * For further details about the great MakeGuide package refer to the MakeGuide
  11.  * package for the CBM AMIGA, a special version of the GNU makeinfo (Simply great
  12.  * for writing docs).
  13.  *
  14.  * Version: $VER: Start_MGuide.ced 1.00    by Gerhard Leibrock (06-Oct-1993)
  15.  *
  16.  * WARNING:
  17.  *         ONLY WORKS FOR PRODUCING .guide FILES !!!!
  18.  *         USELESS FOR PRODUCING .doc OR .dvi FILES !!
  19.  *
  20.  * BUGS:
  21.  *  None known
  22.  *
  23.  * REQUIRES CYGNUS ED PROFESSIONAL AND AREXX !!
  24.  *
  25.  * Gerhard Leibrock, Neuh"auselerstr. 12, 66459 Kirkel, Germany
  26.  * leibrock@fsinfo.cs.uni-sb.de
  27.  ************************************************************************/
  28.  
  29. OPTIONS RESULTS
  30.  
  31. Okay1 "Starting MAKEGUIDE Amiga"
  32. status 19    /* full filename */
  33. fullname=RESULT
  34.  
  35. /* We need an absolute name */
  36. PARSE VALUE namestruc(fullname) WITH ivol idirs ibase .
  37.  
  38. IF "" == SUBSTR(fullname, 1+ivol+idirs+ibase) | UPPER(RIGHT(fullname,4)) ~= "TEXI" THEN DO
  39.     okay1 "Sorry, filename must have an extension and end in `texi'."
  40.     EXIT 5
  41.     END
  42.  
  43. IF 0 = ivol THEN DO
  44.     direc = PRAGMA('d')
  45.     IF RIGHT(direc,1)~='/' & RIGHT(direc,1)~=':' THEN direc=direc||'/'
  46.     fullname = direc||fullname
  47.     DROP direc
  48. END
  49.  
  50. status 20 /* get only the file's path */
  51. path = RESULT
  52. fname = Left(fullname, length(fullname)-5)
  53. IF RIGHT(path,1)~='/' & RIGHT(path,1)~=':' THEN path=path||'/'
  54. comm = 'run execute ' || path ||"Script.Make4Guide" fname path ||"MakeGuide.err"
  55.  
  56. /* DROP ivol idirs ibase */
  57.  
  58. /* Save only if file has been modified */
  59. status 18    /* number of changes to the file */
  60. If 0 < RESULT THEN Save
  61.  
  62. ADDRESS COMMAND comm
  63.  
  64. return 0
  65.